package com.http.nio.core;

import lombok.Data;

import java.io.ByteArrayOutputStream;
import java.util.HashMap;
import java.util.Map;

/**
 * @author YL
 */
@Data
public class Response {

    private Integer code;

    private String protocol = "HTTP/1.1";

    private String msg;

    private Map<String, String> headers;

    private ByteArrayOutputStream outPutStream = new ByteArrayOutputStream();

    public Response() {
        this.code = 200;
        this.msg = "msg";
        headers = new HashMap<>();
        headers.put("Content-Type", "text/html;charset=UTF-8");
        headers.put("Server", "cloud http v1.0");
    }

}
